package com.zpark.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.zpark.entity.Experience;
import com.zpark.mapper.ExperienceMapper;
import com.zpark.service.IExperienceService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author lx
 * @since 2024-03-18
 */
@Service
public class ExperienceServiceImpl extends ServiceImpl<ExperienceMapper, Experience> implements IExperienceService {
    @Resource
    private ExperienceMapper mapper;
    @Override
    public List<Experience> selectByCv_id(int cvId) {
        QueryWrapper<Experience> wrapper = new QueryWrapper<>();
        wrapper.eq("cv_id",cvId);
        List<Experience> experienceList = mapper.selectList(wrapper);
        return experienceList;
    }

    @Override
    public int deleteById(int id) {
        int i = mapper.deleteById(id);
        return i;
    }
}
